package latin.dao;

import latin.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkUsername(String username);

    int checkPhone(String phone);

    User selectByUsernamelogin(@Param("username") String username, @Param("password")String password);

    String selectQuestion(String username);

    int selectByUsernameQuestionAnswer(@Param("username") String username,@Param("question") String question,@Param("answer") String answer);

    int updatePasswordByUsername(@Param("username") String username,@Param("password") String password);

    int checkPassword(@Param("passwordOld") String passwordOld,@Param("id") Long id);
}